<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>注册</title>
        <script src="js/jquery-3.3.1.js"></script>
        <script>
            $(function () {
                $("#regiestForm").submit(function () {
                    $.post("user/regiest",$(this).serialize(),function (info) {
                        if(info.flag){
                            alert(info.data);
                            location.href = "login.html";
                        }
                    })
                });
            });
        </script>
    </head>
    <body>
        <h3>注册</h3>
        <form id="regiestForm">
            用户名:<input type="text" name="username"><br/>
            密码:<input type="password" name="password"><br/>
            邮箱:<input type="text" name="email"><br/>
            性别:
            <input type="radio" name="sex" value="男" checked>男
            <input type="radio" name="sex" value="女">女<br/>
            爱好:
            <input type="checkbox" name="love" value="1">篮球
            <input type="checkbox" name="love" value="2">乒乓球
            <input type="checkbox" name="love" value="3">羽毛球<br/>
            <input type="submit" value="注册">
        </form>

    </body>
</html>
